package com.anycl.design.j2ee.interceptingfilter.instance;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Main {

    public static void main(String[] args) {
        FilterManager filterManager = new FilterManager(new TargetResource() {
            @Override
            public void execute() {
                log.info("service");
            }
        });

        Filter log = new LogFilter();
        Filter auth = new AuthFilter();
        Filter ip = new IpFilter();

        filterManager.addFilter(log);
        filterManager.addFilter(auth);
        filterManager.addFilter(ip);
        filterManager.filterRequest();
    }
}
